In [76]:
from IPython.display import HTML
import pandas as pd
import datetime

HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Source"></form>''')
Out[76]:

Product Management - Metrics & OKRs

In [77]:
now = datetime.datetime.now()
print("Generated on " + now.strftime("%Y-%m-%d"))
Generated on 2019-09-20

This document details a process for the acquisition and analysis of data pertaining to Product Management Metrics and OKRs.


Table of Contents

Data

Metrics


Data

Source

The Product Management Metrics & OKRs are derived from two sources of data- issue metadata and parent/child relationships between PM and Engineering JIRA issues. Figure 1.0 details the relevant metadata and relationships.

To support the veracity of the data acquired, it is requested that Product Engineering contribute to the mapping of Engineering issues to Product Management issues.

Acquisition

Raw changelog and issue metadata is retrieved using the Python JIRA API and transformed using Pandas. Figure 2.0 contains a sample from the PM JIRA project dataset.

Figure 1.0

Metadata and relationship between PM & Engineering JIRA issues.



Figure 2.0

Sample of data extracted from PM → Engineering JIRA issue relationships.

In [78]:
pd.set_option('display.max_columns', None)

sample = pd.read_csv('pm_changelog_clean.csv').drop(['Unnamed: 0', 'remove'], axis=1)
sample[100:105]
Out[78]:
pm_key pm_id related_key related_id related_type updated_time updated_status fix_version labels 5.2_candidate 5.7_candidate 5.8_candidate Cloud_JSX Customer_Priority DDB Design_Implementation DevExperience Enablement Features JSX JSXSquad Milestone1 Milestone2 Perf_Lists Perf_Screen_Transition Perf_Start_Time Performance Performance_Squad Platform Platforms Product_Performance Product_Solutions Q4_2019_candidate_feature RNCloud RN_Upgrade ReactNative Services_Priority Workflow debugging dep_core installer jira_escalated
100 PM-122 81050 RN-1571 82678 Story 2019-02-19T11:50:43.449-0500 Doing [] ['Milestone1', 'Perf_Lists', 'Performance_Squa... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
101 PM-122 81050 RN-1571 82678 Story 2019-02-19T11:50:35.674-0500 To Do [] ['Milestone1', 'Perf_Lists', 'Performance_Squa... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
102 PM-122 81050 RN-1758 84352 Spike 2019-05-22T11:56:41.979-0400 Closed [] ['Milestone1', 'Perf_Lists', 'Performance_Squa... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
103 PM-122 81050 RN-1758 84352 Spike 2019-05-03T10:47:14.994-0400 Doing [] ['Milestone1', 'Perf_Lists', 'Performance_Squa... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
104 PM-122 81050 RN-1758 84352 Spike 2019-05-03T10:47:09.775-0400 To Do [] ['Milestone1', 'Perf_Lists', 'Performance_Squa... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

Metrics

Milestone Investment

The number of issues closed and hours spent towards each of the product investment categories (Product Backlog, CRT, Quality and Engineering) by release and milestone.

Data Point Data Source Work Metric Time Metric
Milestone Label: Milestone, Date Range N/A N/A
Release Field: Fix_Version, Date Range N/A N/A
Product Backlog Children of issues linked to PM issue Sum of Closed Issues in milestone label/date range. Sum time deltas of status changes to doing, test, documentation, verified, closed.
CRT Label: Customer_Priority, Services_Priority on PM issue Sum of Closed Issues in milestone label/date range. Sum time deltas of status changes to doing, test, documentation, verified, closed.
Quality Issue Type: Bug Sum of Closed Issues in milestone label/date range. Sum time deltas of status changes to doing, test, documentation, verified, closed.
Engineering Label: DDB, Delta between PM-linked issues and all Engineering issues Sum of Closed Issues in milestone label/date range. Sum time deltas of status changes to doing, test, documentation, verified, closed.



In [87]:
from scripts import metrics_okrs
import importlib
from pandas.api.types import is_string_dtype

importlib.reload(metrics_okrs)

metrics_okrs.milestone_investment('5.7.0')
metrics_okrs.milestone_investment('5.6.0')
metrics_okrs.milestone_investment('5.5.0')
Out[87]:
release category closed
0 5.5.0 CRT 13
1 5.5.0 Quality 43
2 5.5.0 Engineering 10

Product Management OKRs

The number of issues closed, open issues remaining and time spent towards product objectives (Strategic Accounts, vJSX, Performance, Cloud JSX, RN Upgrade, Enablement and Platform) by release and milestone.

Data Point Data Source Work Metric Time Metric
Milestone Label: Milestone, Date Range N/A N/A
Release Field: Fix_Version, Date Range N/A N/A
Product Backlog Label: Strategic_Accounts, vJSX, Performance, Cloud JSX, RN Upgrade, Enablement, Platform Sum of closed issues with Product Backlog label in milestone label/date range.

Sum of total issues with Product Backlog label in milestone label/date range.
Sum time deltas of status changes to doing, test, documentation, verified, closed.



In [80]:
importlib.reload(metrics_okrs)
metrics_okrs.pm_okrs()
Out[80]:
milestone label closed total diff
0 Milestone1 Cloud_JSX 8 9 1
1 Milestone1 Enablement 1 4 3
2 Milestone1 JSX 17 20 3
3 Milestone1 Performance 0 0 0
4 Milestone1 Platform 1 2 1
5 Milestone1 RNCloud 0 2 2
6 Milestone1 RN_Upgrade 23 28 5
7 Milestone2 Cloud_JSX 0 0 0
8 Milestone2 Enablement 1 1 0
9 Milestone2 JSX 4 13 9
10 Milestone2 Performance 0 0 0
11 Milestone2 Platform 0 0 0
12 Milestone2 RNCloud 0 0 0
13 Milestone2 RN_Upgrade 0 0 0

CRT Breakdown

Explanation goes here